Methods and systems for combined lossless and lossy coding

ABSTRACT

An encoder includes circuitry configured to receive an input video, select a current frame identify a first sub-picture of the current frame to be encoded using a lossless encoding protocol, and encode the current frame, wherein encoding the current frame includes encoding the first sub-picture using the lossless encoding protocol.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority of U.S. ProvisionalPatent Application Ser. No. 63/018,629, filed on May 1, 2020, and titled“METHODS AND SYSTEMS FOR COMBINED LOSSLESS AND LOSSY CODING,” which isincorporated by reference herein in its entirety.

FIELD OF THE INVENTION

The present invention generally relates to the field of videocompression. In particular, the present invention is directed to methodsand systems for combined lossless and lossy coding.

BACKGROUND

A video codec can include an electronic circuit or software thatcompresses or decompresses digital video. It can convert uncompressedvideo to a compressed format or vice versa. In the context of videocompression, a device that compresses video (and/or performs somefunction thereof) can typically be called an encoder, and a device thatdecompresses video (and/or performs some function thereof) can be calleda decoder.

A format of the compressed data can conform to a standard videocompression specification. The compression can be lossy in that thecompressed video lacks some information present in the original video. Aconsequence of this can include that decompressed video can have lowerquality than the original uncompressed video because there isinsufficient information to accurately reconstruct the original video.

There can be complex relationships between the video quality, the amountof data used to represent the video (e.g., determined by the bit rate),the complexity of the encoding and decoding algorithms, sensitivity todata losses and errors, ease of editing, random access, end-to-end delay(e.g., latency), and the like.

Motion compensation can include an approach to predict a video frame ora portion thereof given a reference frame, such as previous and/orfuture frames, by accounting for motion of the camera and/or objects inthe video. It can be employed in the encoding and decoding of video datafor video compression, for example in the encoding and decoding usingthe Motion Picture Experts Group (MPEG)'s advanced video coding (AVC)standard (also referred to as H.264). Motion compensation can describe apicture in terms of the transformation of a reference picture to thecurrent picture. The reference picture can be previous in time whencompared to the current picture, from the future when compared to thecurrent picture. When images can be accurately synthesized frompreviously transmitted and/or stored images, compression efficiency canbe improved.

SUMMARY OF THE DISCLOSURE

In an aspect, an encoder includes circuitry configured to receive aninput video, select a current frame, identify a first region of thecurrent frame to be encoded using a first lossless encoding protocol,and encode the current frame, wherein encoding the current frame furthercomprises encoding the first region using the first lossless encodingprotocol.

A method of combined lossless and lossy coding includes receiving, by anencoder, an input video, selecting, by the encoder, a current frame,identifying, by the encoder, a first region of the current frame to beencoded using a first lossless encoding protocol, and encoding, by theencoder, the current frame, wherein encoding the current frame furthercomprises encoding the first region using the first lossless encodingprotocol.

These and other aspects and features of non-limiting embodiments of thepresent invention will become apparent to those skilled in the art uponreview of the following description of specific non-limiting embodimentsof the invention in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

For the purpose of illustrating the invention, the drawings show aspectsof one or more embodiments of the invention. However, it should beunderstood that the present invention is not limited to the precisearrangements and instrumentalities shown in the drawings, wherein:

FIG. 1 is a block diagram illustrating an exemplary embodiment of aframe having a plurality of sub-pictures;

FIG. 2 is an illustration of an exemplary embodiment of a frame havingtwo sub-pictures;

FIG. 3 is a process flow diagram illustrating an example process fordecoding a video according to some implementations of the currentsubject matter;

FIG. 4 is a system block diagram illustrating an example decoder capableof decoding a bit stream according to some implementations of thecurrent subject matter;

FIG. 5 is a process flow diagram illustrating an example process forencoding a video according to some implementations of the currentsubject matter;

FIG. 6 is a process flow diagram illustrating an example process ofencoding a video according to some implementations of the currentsubject matter; and

FIG. 7 is a block diagram of a computing system that can be used toimplement any one or more of the methodologies disclosed herein and anyone or more portions thereof.

The drawings are not necessarily to scale and may be illustrated byphantom lines, diagrammatic representations and fragmentary views. Incertain instances, details that are not necessary for an understandingof the embodiments or that render other details difficult to perceivemay have been omitted.

DETAILED DESCRIPTION

In traditional video coding systems, video sequence is divided intogroups-of-pictures (GOP). Each GOP is self-contained in the sense oftemporal and spatial prediction. Usually, first picture in the group isused as a reference picture for the subsequent pictures. Temporal andspatial relationships between the pictures allow for the very efficientcompression using predictive coding.

Past coding systems have typically operated using lossy coding, in whichsome information from an encoded frame is omitted during the encodingprocess and is not recovered during decoding. Such lossy processes maysacrifice a certain degree of detail and/or resolution in decoded framesand/or video pictures to achieve higher degrees of efficiency, forinstance and without limitation by reducing quantities of datatransmitted in a bit stream from an encoder to a decoder, processingtime and/or memory resources used to encode and/or decode a frame orgroup of pictures, or the like.

An alternative approach to the above process may include losslessencoding, wherein a frame is encoded and decoded with no or negligibleloss of information; this may result in greater resolution and/or otherdetail in an output frame and/or video picture. However, while losslessencoding and decoding may occasionally be more efficient for certainkinds of image processing as noted in further detail below, losslessencoding can also be very expensive in terms of memory resources andprocessing times. This is particularly apparent in ultra high definition(UHD) video coding, in which a picture or image size may go up to 8K×4K(7680×4320); a big picture size may pose great challenge for chip and/ormodule design. One reason for this is that the UHD requires a biggersearch range in motion estimation and on-chip or other processing memoryfor buffering reference blocks for motion estimation and compensation.UHD processing may even present challenges for lossy encoding anddecoding owing to the greater picture sizes involved.

Embodiments disclosed herein enable more efficient signaling, decoding,and encoding using combined lossless and lossy video compression coding.In an embodiment, a picture may first be divided into sub-pictures basedon quality and computation requirements. An encoder may create as manysub-pictures as there are processing cores (or hardware threads) on aCPU or other device, circuit, or component that is performing encodingand/or decoding of pictures and/or GOP. Since each sub-picture may beindependently coded, this form of task partitioning may allow forefficient encoding and/or decoding by using all available computingresources effectively. Moreover, lossless encoding may furnish bettercompression than lossy coding that uses transform and quantization, forinstance for certain sub-pictures of an overall frame; as a result,combined lossless and lossy coding may result in superior performance tolossless coding alone.

In some implementations, picture segmentation is performed using sampleblocks as a basic unit. Sample blocks may have a uniform sample blocksize, which may a side length, in pixels of a square of pixels; forinstance and without limitation, embodiments disclosed herein may use4×4 sample blocks as a basic unit and the measure of spatial activitythat includes computing frequency components of the 4×4 sample blocks.By utilizing 4×4 blocks as a basic segmentation size someimplementations of the current subject matter may allow for finergranularity by the encoder and such a size aligns with establishedtransform block sizes, enabling utilizing of standard and definedtransform matrices, which may improve encoding efficiency. Further, suchan approach may be contrasted with some existing approaches to encoding,which use fixed block structure of relatively large size. Personsskilled in the art, upon reviewing the entirety of this disclosure, willappreciate that, while for the sake of brevity 4×4 sample blocks aredescribed in many ensuing examples, in general any size or shape ofsample blocks, according to any method of measurement, may be used forpicture partitioning and/or segmentation.

Referring now to FIG. 1 , an exemplary embodiment of a current framedivided into a plurality of sub-pictures is illustrated. Sub-picturesmay include any portion of current frame smaller than current frame;sub-pictures of current frame may combine to cover all of current frame.Although FIG. 1 illustrates exemplary current frames divided into two orfour sub-pictures, persons skilled in the art having viewed the entiretyof this disclosure will appreciate that any number of sub-pictures maybe used as appropriate for resolution, efficiency, or any otherconsideration.

Still referring to FIG. 1 , a sub-picture may have any suitable shape,including without limitation a square and/or rectangular shape, a shapedefined by combination of two or more blocks having square and/orrectangular shapes, or the like. Each block may be identified and/orsignaled using coordinates of one or more portions and/or features of ablock, where coordinates may indicate number of pixels across frameand/or picture as measured from one or more corners and/or sides of theframe and/or picture. For instance, and without limitation, a block maybe identified using coordinates of vertices, such as two x coordinatesand two y coordinates for identification of a rectangular block. Asub-picture and/or portion thereof may alternatively or additionally beidentified using any suitable geometric description of points, lines,and/or shapes, including without limitation geometric partition usingone or more line segments, as defined by linear equations ormathematically equivalent expressions such as line-segment endpoints,using one or more curved edges such as without limitation defined usingexponential or other curves, or the like

With continued reference to FIG. 1 , sub-pictures may be codedseparately from one another. For instance, and without limitation, afirst region of a plurality of sub-pictures may be encoded and/ordecoded using a first processor thread and a second region element maybe decoded using a second processor thread. A “processor thread” as usedherein may include any processor core and/or other hardware elementcapable of executing a thread of a multithreaded parallel process thatmay occur to persons skilled in the art upon reviewing the entirety ofthis disclosure. In an embodiment, where each sub-picture isindependently coded, this form of task partitioning may allow forefficient encoding by using all available computing resourceseffectively

Still referring to FIG. 1 , lossless coding may be selectively appliedto a subset of blocks of a picture where it is desirable for one or morereasons described above for a source video to be preserved without anyloss. As a non-limiting example, selection of a subset of a picture forlossless coding may be done for reasons of coding efficiency. In suchcases, lossless coding mode decision may be made after evaluating arate-distortion (RD) cost of coding a CTU in lossy and lossless modes.In certain use cases, portions of a video may be selected by the user tobe encoded in lossless mode for reasons dictated by applications. Anon-limiting example may include situations where portion of a framewhere source quality retention is desirable for a user. When such userselections are made, an entire region may be marked as using losslesscoding without performing any RD analysis.

Alternatively or additionally, and further referring to FIG. 1 , asub-picture may be identified by an encoder and/or other hardware and/orsoftware component and/or process as an area, region and/or subdivisionof a picture in which greater amounts of motion are detected and/orpresent; such regions may be identified as sub-pictures can consideredsignificant and coded using lossless coding, while sub-pictures withlittle or no motion may be coded using lossy coding. An example is showin FIG. 2 , where a picture 200 is divided in two sub-pictures: a firstregion 204 with motion, and second and/or third region 208 with nomotion. As noted above, in some cases lossless coding may give bettercompression than lossy coding with that uses transform and quantization.In an alternative or additional example, a picture 200 may be dividedinto a first region 204 encoded using a first lossless protocol, asecond region (not shown) using a second lossless protocol, and a thirdregion using a lossy protocol.

Referring again to FIG. 1 , a picture may be divided into sub-pictures,slices, and tiles. Blocks (CTUs) may be coding units that may be codedin intra or inter coding mode. A sub-picture may include a single CTUand/or plurality of CTUs. In an embodiment, each CTU in a subset of CTUsmay signal whether lossless coding is used in the CTU; alternatively oradditionally, a set of CTUs, such as without limitation a set ofcontiguously located CTUs may be signaled together. Lossless and/orlossy coding may be signaled in one or more headers provided to abitstream. For instance, and without limitation, CTUs may be coded inlossless coding mode by signaling lossless and/or lossy coding mode in aCTU header. Selective use of lossless coding for a sub-set of blocks(CTUs) may alternatively or additionally be signaled at a higher-levelsyntactic unit. For example, a tile, slice, and/or sub-picture headermay signal the use of lossless coding modes for all the CTUs in thatsyntactic unit. A sub-picture header may be either explicitly present orincluded by reference using a mechanism such as an identifier of anotherheader such as a previously signaled picture header.

As a non-limiting example, and continuing to refer to FIG. 1 , dataand/or logic within a sub-picture header, CTU header, and/or otherheader may include, without limitation, a first bit indicating whetherlossless mode signaling is enabled, or in other words whether encoderand/or decoder should signal and/or receive a signal indicating whetherlossless and/or lossy mode is being used for the relevant CTU,sub-picture, or the like. Data and/or logic within a sub-picture header,CTU header, and/or other header may include, without limitation, asecond bit indicating lossless and/or lossy mode, where a lossless modeis a mode in which relevant CTU, sub-picture, or the like is encoded anddecoded using a lossless encoding and decoding protocol as describedabove. The following is a non-limiting and illustrative example of logicand data that may be employed

Sub_picture_header{ .. .. .. lossless_mode_signaling [1-bit]if(lossless_mode_signaling){ lossless_mode [1 bit]; } .. .. ... }

Still referring to FIG. 1 , an encoder and/or decoder configured toperform processes described in this disclosure may be configured tosignal and/or detect a lossless encoding protocol used, for instanceusing an identifier and/or bit corresponding to the lossless encodingprotocol. Alternatively or additionally, encoder and/or decoder may beconfigured to operate a specific lossless encoding and decodingprotocol, for instance as consistent with a given standard, release, orother approach to adopting uniform standard. There may be two or morestandard protocols, selection of which may be signaled in a bitstreamusing a sufficient number of bits to encode the two or more potentialselections.

With continued reference to FIG. 1 , lossless coding protocol mayinclude any protocol for lossless encoding of images, videos, frames,pictures, sub-pictures or the like. As a non-limiting example, encoderand/or decoder may accomplish lossless coding is to bypass a transformcoding stage and encode residual directly. This approach, which may bereferred to in this disclosure as “transform skip residual coding,” maybe accomplished by skipping transformation of a residual, as describedin further detail below, from spatial into frequency domain by applyinga transform from the family of discrete cosine transforms (DCTs), asperformed for instance in some forms of block-based hybrid video coding.Lossless encoding and decoding may be performed according to one or morealternative processes and/or protocols, including without limitationprocesses and/or protocols as proposed at Core Experiment CE3-1 ofJVET-Q00069 pertaining to regular and TS residual coding (RRC, TSRC) forlossless coding, and modifications to RRC and TSRC for lossless andlossy operation modes, Core Experiment CE3-2 of JVET-Q0080, pertainingto enabling block differential pulse-code modulation (BDPCM) andhigh-level techniques for lossless coding, and the combination of BDPCMwith different RRC/TSRC techniques, or the like.

With further reference to FIG. 1 , an encoder as described in thisdisclosure may be configured to encode one or more fields using TSresidual coding, where one or more fields may include without limitationany picture, sub-picture, coding unit, coding tree unit, tree unit,block, slice, tile, and/or any combination thereof. A decoder asdescribed in this disclosure may be configured to decode one or morefields according to and/or using TS residual coding. In transform skipmode, residuals of a field may be coded in units of non-overlappedsubblocks, or other subdivisions, of a given size, such as withoutlimitation a size of four pixels by four pixels. A quantization index ofeach scan position in a field to be transformed may be coded, instead ofcoding a last significant scan position; a final subblock and/orsubdivision position may be inferred based on levels of previoussubdivisions. TS residual coding may perform diagonal scan in a forwardmanner rather than a reverse manner. Forward scanning order may beapplied to scan subblocks within a transform block as well as positionswithin a subblock and/or subdivision; in an embodiment, there may be nosignaling of a final (x, y) position. As a non-limiting example, acoded_sub_block_flag may be coded for every subblock except for a finalsubblock when all previous flags are equal to 0. sig_coeff_flag contextmodelling may use a reduced template. A context model of sig_coeff_flagmay depend on top and left neighboring values; context model ofabs_level_gt1 flag may also depend on left and top sig_coeff_flagvalues.

Still referring to FIG. 1 , and as a non-limiting example, during afirst scan pass in a TS residual coding process, a significance flag(sig_coeff_flag), sign flag (coeff_sign_flag), absolute level greaterthan 1 flag (abs_level_gtx_flag[0]), and parity (par_level_flag) may becoded. For a given scan position, if sig_coeff_flag is equal to 1, thencoeff_sign_flag may be coded, followed by the abs_level_gtx_flag[0](which specifies whether the absolute level is greater than 1). Ifabs_level_gtx_flag[0] is equal to 1, then the par_level_flag isadditionally coded to specify the parity of the absolute level. During asecond or subsequent scan pass, for each scan position whose absolutelevel is greater than 1, up to four abs_level_gtx_flag[i] for i=1 . . .4 may be coded to indicate if an absolute level at a given position isgreater than 3, 5, 7, or 9, respectively. During a third or final“remainder” scan pass, remainder, which may be stored as absolute levelabs remainder may be coded in a bypass mode. Remainder of absolutelevels may be binarized using a fixed rice parameter value of 1.

Further referring to FIG. 1 , bins in a first scan pass and second or“greater-than-x” scan pass may be context coded until a maximum numberof context coded bins in a field, such as without limitation a TU, havebeen exhausted. a maximum number of context coded bins in a residualblock may be limited, in a non-limiting example, to 1.75*blockwidth*block height, or equivalently, 1.75 context coded bins per sampleposition on average. Bins in a last scan pass such as a remainder scanpass as described above, may be bypass coded. A variable, such aswithout limitation RemCcbs, may be first set to a maximum number ofcontext-coded bins for a block or other field and may be decreased byone each time a context-coded bin is coded. In a non-limiting example,while RemCcbs is larger than or equal to four, syntax elements in afirst coding pass, which may include sig_coeff_flag, coeff_sign_flag,abs_level_gt1_flag and par_level_flag, may be coded using context-codedbins. In some embodiments, if RemCcbs becomes smaller than 4 whilecoding a first pass, a remaining coefficients that have yet to be codedin the first pass may be coded in the remainder scan pass and/or thirdpass.

Still referring to FIG. 1 , after completion of first pass coding, ifRemCcbs is larger than or equal to four, syntax elements in secondcoding pass, which may include abs_level_gt3_flag, abs_level_gt5_flag,abs_level_gt7_flag, and abs_level_gt9_flag, may be coded using contextcoded bins. If the RemCcbs becomes smaller than 4 while coding a secondpass, remaining coefficients that have yet to be coded in the secondpass may be coded in a remainder and/or third scan pass. In someembodiments, a block coded using TS residual coding may not be codedusing BDPCM coding. For a block not coded in the BDPCM mode, a levelmapping mechanism may be applied to transform skip residual coding untila maximum number of context coded bins has been reached. Level mappingmay use top and left neighboring coefficient levels to predict a currentcoefficient level in order to reduce signaling cost. For a givenresidual position, absCoeff may be denoted as an absolute coefficientlevel before mapping and absCoeffMod may be denoted as a coefficientlevel after mapping. As a non-limiting example, where X0 denotes anabsolute coefficient level of a left neighboring position and X1 denotesan absolute coefficient level of an above neighboring position, a levelmapping may be performed as follows:pred=max(X ₀ ,X ₁); if(absCoeff==pred)absCoeffMod=1; elseabsCoeffMod=(absCoeffMod<pred)?absCoeff+1:absCoeffabsCoeffMod value may then be coded as described above. After allcontext coded bins have been exhausted, level mapping may be disabledfor all remaining scan positions in a current block and/or field and/orsubdivision. Three scan passes as described above may be performed foreach subblock and/or other subdivision if a coded_subblock_flag is equalto 1, which may indicate that there is at least one non-zero quantizedresidual in the subblock.

In some embodiments, and still referring to FIG. 1 , when transform skipmode is used for a large block, the entire block may be used withoutzeroing out any values. In addition, transform shift may be removed intransform skip mode. Statistical characteristics of a signal in TSresidual coding may be different from those of transform coefficients.Residual coding for transform skip mode may specify a maximum lumaand/or chroma block size; as a non-limiting example, settings may permittransform skip mode to be used for luma blocks of size up to MaxTsSizeby MaxTsSize, where a value of MaxTsSize may be signaled in a PPS andmay have a global maximum possible value such as without limitation 32.When a CU is coded in transform skip mode, its prediction residual maybe quantized and coded using a transform skip residual coding process.

With continued reference to FIG. 1 , an encoder as described in thisdisclosure may be configured to encode one or more fields using BDPCM,where one or more fields may include without limitation any picture,sub-picture, coding unit, coding tree unit, tree unit, block, slice,tile, and/or any combination thereof. A decoder as described in thisdisclosure may be configured to decode one or more fields according toand/or using BDPCM. BDPCM may keep full reconstruction at a pixel level.As a non-limiting example, a prediction process of each pixel with BDPCMmay include four main steps, which may predict each pixel using itsin-block references, then reconstruct it to be used as in-blockreference for subsequent pixels in the rest of the block: (1) in-blockpixel prediction, (2) residual calculation, (3) residual quantization,and (4) pixel reconstruction.

Still referring to FIG. 1 , in-block pixel prediction may use aplurality of reference pixels to predict each pixel; as a non-limitingexample, plurality of reference pixels may include a pixel α at left ofthe pixel p to be predicted, a pixel β above p, and a pixel γ above andto the left of p. A prediction of p may be formulated, withoutlimitation, as follows:

$p = \left\{ \begin{matrix}{{\min\left( {\alpha,\beta} \right)},} & {{{if}\mspace{14mu}\gamma} \leq {\max\left( {\alpha,\beta} \right)}} \\{{\max\left( {\alpha,\beta} \right)},} & {{{if}\mspace{14mu}\gamma} \geq {\min\left( {\alpha,\beta} \right)}} \\{{\alpha + \beta - \gamma},} & {Otherwise}\end{matrix} \right.$

Still referring to FIG. 1 , once a prediction value has been calculated,its residual may be calculated. Since a residual at this stage may belossless and inaccessible at a decoder side, it may be denoted as {tildeover (r)} and calculated as a subtraction of an original pixel value ofrom prediction p:{tilde over (r)}=o−p

Further referring to FIG. 1 , pixel-level independence may be achievedby skipping a residual transformation and integrating a spatial domainquantization. This may be performed by a linear quantizer Q to calculatea quantized residual value r as follows:r=Q({tilde over (r)})

To accommodate a correct rate-distortion ratio, imposed by a QuantizerParameter (QP), BDPCM may adopt a spatial domain normalization used in atransfer-skip mode method, for instance and without limitation asdescribed above. Quantized residual value r may be transmitted by anencoder.

Still referring to FIG. 1 , another state of BDPCM may include pixelreconstruction using p and r from previous steps, which may beperformed, for instance and without limitation at or by a decoder, asfollows:c=p+rOnce reconstructed, current pixel may be used as an in-block referencefor other pixels within the same block.

A prediction scheme in an BDPCM algorithm may be used where there is arelatively large residual, when an original pixel value is far from itsprediction. In screen content, this may occur where in-block referencesbelong to a background layer, while a current pixel belongs to aforeground layer, or vice versa. In this situation, which may bereferred to as a “layer transition” situation, available information inreferences may not be adequate for an accurate prediction. At a sequencelevel, a BDPCM enable flag may be signaled in an SPS; this flag may,without limitation, be signaled only if a transform skip mode, forinstance and without limitation as described above, is enabled in theSPS. When BDPCM is enabled, a flag may be transmitted at a CU level if aCU size is smaller than or equal to MaxTsSize by MaxTsSize in terms ofluma samples and if the CU is intra coded, where MaxTsSize is a maximumblock size for which a transform skip mode is allowed. This flag mayindicate whether regular intra coding or BDPCM is used. If BDPCM isused, a BDPCM prediction direction flag may be transmitted to indicatewhether a prediction is horizontal or vertical. Then, a block may bepredicted using regular horizontal or vertical intra prediction processwith unfiltered reference samples.

Referring now to FIG. 3 , an exemplary embodiment of a method 300 ofcombined lossless and lossy coding is illustrated. At step 305, adecoder receives a bitstream. At step 310, decoder identifies a currentframe in bitstream. Current frame may include a first region, a secondregion, and a third region, any of which may include any region asdescribed above; regions may be flagged using frame header informationand/or delineated or otherwise described using coordinates, geometricinformation, identifications of blocks and/or CTUs included in eachregion, or the like. In an embodiment, decoder may identify only tworegions of first region, second region, and third region in currentframe, while a remaining region may be identified as remaining tiles,slices, blocks, CTUs, or the like of current frame. There may be morethan three regions; method 300 may include any processing step asdescribed in this disclosure being performed with regard to anyadditional regions.

At step 315, and with continued reference to FIG. 3 , decoder detects,in the bitstream, an indication that the first region is encodedaccording to block differential pulse code modulation; this may beperformed, without limitation, as described above in reference to FIGS.1-2 . Detection may include and/or be preceded by detection that blockdifferential pulse code modulation is enabled, for instance as describedabove. In an embodiment, bitstream may include a sub-picture headercorresponding to first region. Detection may include detectingindication that at least a first region is encoded according to blockdifferential pulse code modulation in a sub-picture and/orregion-specific header. Sub-picture header may be explicitly included indata corresponding to current frame. For instance, and withoutlimitation, sps_bdpcm_enabled_flag may be set to 1 in an SPS and/orother header if bdpcm is enabled for a sequence. sps_bdpcm_enabled_flagequal to 1 may specify that an intra_bdpcm_luma_flag and/or anintra_bdpcm_chroma_flag may be present in coding unit and/or otherfield-specific syntax for intra coding units and/or other fields.sps_bdpcm_enabled_flag equal to 0 may specify that intra_bdpcm_luma_flagand/or intra_bdpcm_chroma_flag are not present in coding unit and/orother field-specific syntax for intra coding units and/or other fields.When not present, a value of sps_bdpcm_enabled_flag may be inferred tobe equal to 0. In an embodiment, a gci_no_bdpcm_constraint_flag equal to1 may specify that sps_bdpcm_enabled_flag for all pictures in a givenset, which may be defined without limitation by an OlsInScope parameter,shall be equal to 0. gci_no_bdpcm_constraint_flag equal to 0 may notimpose such a constraint. As a further non-limiting example,intra_bdpcm_luma_flag equal to 1 may specify that BDPCM may be appliedto a current luma coding block, and/or other field at a location (x0,y0), i.e. the transform is skipped; a luma intra prediction mode may bespecified by intra_bdpcm_luma_dir_flag. For instance and withoutlimitation, intra_bdpcm_luma_flag equal to 0 may specify that BDPCM isnot applied to a current luma coding block, and/or other field, at alocation (x0, y0). When intra_bdpcm_luma_flag is not present it may beinferred to be equal to 0. A variable BdpcmFlag[x][y][cIdx] may be setequal to intra_bdpcm_luma_flag for x=x0 . . . x0+cbWidth−1, y=y0 . . .y0+cbHeight−1 and cIdx=0. intra_bdpcm_luma_dir_flag equal to 0 mayspecify that a BDPCM prediction direction is horizontal.intra_bdpcm_luma_dir_flag equal to 1 may specify that a BDPCM predictiondirection is vertical. Variable BdpcmDir[x][y][cIdx] may be set equal tointra_bdpcm_luma_dir_flag for x=x0 . . . x0+cbWidth−1, y=y0 . . .y0+cbHeight−1 and cIdx=0. Sub-picture and/or region may be included byreference to an identifier of a sub-picture header corresponding to athird sub-picture and/or other element of current frame.

At step 320, and with continued reference to FIG. 3 , decoder detects,in the bitstream, an indication that second region is encoded accordingto transfer skip residual coding; this may be performed, withoutlimitation, as described above in reference to FIGS. 1-2 . Detection mayinclude and/or be preceded by detection that transfer skip residualcoding is enabled, for instance as described above. In an embodiment,bitstream may include a sub-picture header corresponding to firstregion. Detection may include detecting indication that at least a firstregion is encoded according to a transfer skip residual coding protocolin a sub-picture header; this may include a transform skip enable flag.For instance, and without limitation, ash_ts_residual_coding_disabled_flag equal to 1 may specify that aresidual_coding syntax structure may be used to parse the residualsamples of a transform skip block for a current slice and/or otherfield. sh_ts_residual_coding_disabled_flag equal to 0 may specify that aresidual_ts_coding syntax structure may be used to parse residualsamples of a transform skip block for a current slice. Whensh_ts_residual_coding_disabled_flag is not present, it may be inferredto be equal to 0. transform_skip_flag[x0][y0][cIdx] may specify whethera transform may be applied to an associated transform block or not.Array indices x0, y0 may specify a location (x0, y0) of a top-left lumasample of a considered transform block relative to a top-left lumasample of a picture. An array index cIdx may specify an indicator for acolour component; it may, for instance, be equal to 0 for Y, 1 for Cb,and 2 for Cr. transform_skip_flag[x0][y0][cIdx] equal to 1 may specifythat no transform may be applied to an associated transform block.transform_skip_flag[x0][y0][cIdx] equal to 0 may specify that a decisionwhether transform is applied to the associated transform block or notdepends on other syntax elements. Transform skip mode may alternativelyor additionally be signaled implicitly. For instance, Whentransform_skip_flag[x0][y0][cIdx] is not present, it may be inferred asfollows: If BdpcmFlag[x0][y0][cIdx] is equal to 1transform_skip_flag[x0][y0][cIdx] may be inferred to be equal to 1;otherwise, where BdpcmFlag[x0][y0][cIdx] is equal to 0,transform_skip_flag[x0][y0][cIdx] may be inferred to be equal to 0.Sub-picture and/or region-specific header may be explicitly included indata corresponding to current frame. Sub-picture and/or region may beincluded by reference to an identifier of a sub-picture headercorresponding to a third sub-picture and/or other element of currentframe.

At step 325, and with continued reference to FIG. 3 , decoder detectsthat third region is encoded according to a lossy encoding protocoldecode third region according to a lossy decoding protocol correspondingto the lossless encoding protocol; this may be performed according toany lossy decoding process described herein, including processesincluding DCT and other processes as described below. Bitstream mayinclude a sub-picture and/or region-specific header corresponding to thethird region and detecting may include the indication that the thirdregion is encoded according to a lossy encoding protocol in thesub-picture header. Sub-picture and/or region-specific header may beexplicitly included in data corresponding to the current frame.Sub-picture and/or region-specific header may be included by referenceto an identifier of a sub-picture and/or region-specific headercorresponding to a third sub-picture, for instance as described above.In an embodiment, decoder may be configured to decode first region usinga first processor thread, as defined above, and decode third regionelement using a second processor thread.

Continuing to refer to FIG. 3 , decoder may decode current frame.Decoding current frame may include decoding first region using a BDPCMdecoding protocol corresponding to BDPCM encoding protocol. Decodingcurrent frame may include decoding second region using a transfer-skipresidual decoding protocol corresponding to a transfer-skip residualencoding protocol. Decoding current frame may include decoding thirdregion using a lossy decoding protocol corresponding to lossy encodingprotocol.

Still referring to FIG. 3 , the decoder may include an entropy decoderprocessor configured to receive the bit stream and decode the bitstreaminto quantized coefficients, an inverse quantization and inversetransformation processor configured to process the quantizedcoefficients including performing an inverse discrete cosine, adeblocking filter, a frame buffer, and an intra prediction processor. Atleast one of first region, second region, and third region may form partof a quadtree plus binary decision tree. At least one of first region,second region, and third region includes a coding tree unit. In someimplementations, at least one of first region, second region, and thirdregion may include a coding tree unit (CTU), a coding unit (CU), or aprediction unit (PU).

FIG. 4 is a system block diagram illustrating an example decoder 400capable of decoding a bitstream 428 using combined lossy and losslesscoding protocols. Decoder 400 may include an entropy decoder processor404, an inverse quantization and inverse transformation processor 408, adeblocking filter 412, a frame buffer 416, a motion compensationprocessor 420 and/or an intra prediction processor 424.

In operation, and still referring to FIG. 4 , bit stream 428 may bereceived by decoder 400 and input to entropy decoder processor 404,which may entropy decode portions of bit stream into quantizedcoefficients. Quantized coefficients may be provided to inversequantization and inverse transformation processor 408, which may performinverse quantization and inverse transformation to create a residualsignal, which may be added to an output of motion compensation processor420 or intra prediction processor 424 according to a processing mode. Anoutput of the motion compensation processor 420 and intra predictionprocessor 424 may include a block prediction based on a previouslydecoded block. A sum of prediction and residual may be processed bydeblocking filter 412 and stored in a frame buffer 416.

With continued reference to FIG. 4 decoder 400 may be designed and/orconfigured to perform any method, method step, or sequence of methodsteps in any embodiment described in this disclosure, in any order andwith any degree of repetition. For instance, decoder 400 may beconfigured to perform a single step or sequence repeatedly until adesired or commanded outcome is achieved; repetition of a step or asequence of steps may be performed iteratively and/or recursively usingoutputs of previous repetitions as inputs to subsequent repetitions,aggregating inputs and/or outputs of repetitions to produce an aggregateresult, reduction or decrement of one or more variables such as globalvariables, and/or division of a larger processing task into a set ofiteratively addressed smaller processing tasks. Decoder 400 may performany step or sequence of steps as described in this disclosure inparallel, such as simultaneously and/or substantially simultaneouslyperforming a step two or more times using two or more parallel threads,processor cores, or the like; division of tasks between parallel threadsand/or processes may be performed according to any protocol suitable fordivision of tasks between iterations. Persons skilled in the art, uponreviewing the entirety of this disclosure, will be aware of various waysin which steps, sequences of steps, processing tasks, and/or data may besubdivided, shared, or otherwise dealt with using iteration, recursion,and/or parallel processing.

Referring now to FIG. 5 , an exemplary embodiment of a method ofcombined lossless and lossy coding is illustrated. At step 505 anencoder receives an input video. This may be accomplished in any mannersuitable for receiving a video in streaming and/or file form from anydevice and/or input port. Receiving video may include retrieval of oneor more frames from memory of encoder and/or a computing device incommunication with, incorporating, and/or incorporated in encoder.Receiving may include receiving one or more frames a remote device overa network. Receiving video may include receiving a plurality of videoframes that combine to make up one or more videos.

At step 510, and continuing to refer to FIG. 5 , encoder selects acurrent frame; this may be implemented, without limitation, any mannersuitable for selection of a current frame of one or more frames makingup a video. Encoder may segment and/or partition video frame intoblocks. The blocks may have any suitable shape or size, including a sizeof 4 pixels by 4 pixels (4×4). A 4×4 size may be compatible with manystandard video resolutions, which may be divided into an integer numberof 4×4 blocks.

At step 515, and still referring to FIG. 5 , encoder identifies a firstregion of current frame to be encoded using a lossless encodingprotocol. In an embodiment, this may be performed by receiving a useridentification of first region, for instance by selection of an area offrame, of a number of blocks of frame, or the like. Alternatively oradditionally, identification of first region may be performed byreceiving semantic information regarding one or more blocks and/orportions of frame and using semantic information to identify blocksand/or portions of frame for inclusion in first region. Semanticinformation may include, without limitation data characterizing a facialdetection. Facial detection and/or other semantic information may beperformed by an automated facial recognition process and/or program,and/or may be performed by receiving identification of facial data,semantic information, or the like from a user. Alternatively oradditionally, semantic importance may be computed using significancescores as described below.

Still referring to FIG. 5 , encoder may identify first region bydetermining an average measure of information of a plurality of blocksand identifying the first region using the average measure ofinformation. Identification may include, for instance, comparison ofaverage measure of information to a threshold. Average measure ofinformation may be determined by calculating a sum of a plurality ofinformation measures of the plurality of blocks, which may be multipliedby a significance coefficient. Significance coefficient may bedetermined based on a characteristic of the first area. Significancecoefficient may alternatively be received from a user. Measure ofinformation may include, for example, a level of detail of an area ofcurrent frame. For example, a smooth area or a highly textured area maycontain differing amounts of information.

Still referring to FIG. 5 , an average measure of information may bedetermined, as a non-limiting example, according to a sum of informationmeasures for individual blocks within an area, which may be weightedand/or multiplied by a significance coefficient, for instance a shown inthe following sum:A _(N) =S _(N)*Σ_(k=1) ^(n) B _(k)where N is a sequential number of the first area, S_(N) is asignificance coefficient, k is an index corresponding to a block of aplurality of blocks making up first area, n is a number of blocks makingup the area, B_(k) is a measure of information of a block of the blocks,and A_(N) is the first average measure of information. B_(k) mayinclude, for example, a measure of spatial activity computed using adiscrete cosine transform of a block. For example, where blocks asdescribed above are 4×4 blocks of pixels, a generalized discrete cosinetransform matrix may include a generalized discrete cosine transform IImatrix taking the form of:

$T = \begin{pmatrix}a & a & a & a \\b & c & {- c} & {- b} \\a & {- a} & {- a} & a \\c & {- b} & b & {- c}\end{pmatrix}$${{where}\mspace{14mu} a\mspace{14mu}{is}\mspace{14mu}{1/2}},\text{}{b\mspace{14mu}{is}\mspace{14mu}\sqrt{\frac{1}{2}}\cos\frac{\pi}{8}},{{and}\mspace{14mu} c\mspace{14mu}{is}\mspace{14mu}\sqrt{\frac{1}{2}}\cos{\frac{3\pi}{8}.}}$

In some implementations, and still referring to FIG. 5 , an integerapproximation of a transform matrix may be utilized, which may be usedfor efficient hardware and software implementations. For example, whereblocks as described above are 4×4 blocks of pixels, a generalizeddiscrete cosine transform matrix may include a generalized discretecosine transform II matrix taking the form of:

$T_{INT} = {\begin{pmatrix}1 & 1 & 1 & 1 \\2 & 1 & {- 1} & {- 2} \\1 & {- 1} & {- 1} & 1 \\1 & {- 2} & 2 & {- 1}\end{pmatrix}.}$

For a block B_(i), a frequency content of the block may be calculatedusing:F _(Bi) =T×B _(i) ×T′.where T′ is a transverse of a cosine transfer matrix T, B_(i) is a blockrepresented as a matrix of numerical values corresponding to pixels inthe block, such as a 4×4 matrix representing a 4×4 block as describedabove, and the operation x denotes matrix multiplication. Measure ofspatial activity may alternatively or additionally be performed usingedge and/or corner detection, convolution with kernels for patterndetection, and/or frequency analysis such as without limitation FFTprocesses as described in further detail below.

Continuing to refer to FIG. 5 , where encoder is further configured todetermine a second area within the video frame as described in furtherdetail below, encoder may be configured to determine a second averagemeasure of information of the second area; determining the secondaverage measure of information may be accomplished as described abovefor determining a first average measure of information.

Still referring to FIG. 5 , significance coefficient S_(N) may besupplied by an outside expert and/or calculated based on thecharacteristics of an area. A “characteristic” of an area, as usedherein, is a measurable attribute of the area that is determined basedupon its contents; a characteristic may be represented numerically usingan output of one or more computations performed on first area. One ormore computations may include any analysis of any signal represented byfirst area. One non-limiting example may include assigning higher S_(N)for an area with a smooth background and a lower S_(N) for an area witha less smooth background in quality modeling applications; as anon-limiting example, smoothness may be determined using Canny edgedetection to determine a number of edges, where a lower number indicatesa greater degree of smoothness. A further example of automaticsmoothness detection may include use of fast Fourier transforms (FFT)over a signal in spatial variables over an area, where signal may beanalyzed over any two-dimensional coordinate system, and over channelsrepresenting red-green-blue color values or the like; greater relativepredominance in a frequency domain, as computed using an FFT, of lowerfrequency components may indicate a greater degree of smoothness,whereas greater relative predominance of higher frequencies may indicatemore frequent and rapid transitions in color and/or shade values overbackground area, which may result in a lower smoothness score;semantically important objects may be identified by user input. Semanticimportance may alternatively or additionally be detected according toedge configuration, and/or texture pattern. A background may beidentified, without limitation, by receiving and/or detecting a portionof an area that represents significant or “foreground” object such as aface or other item, including without limitation a semanticallyimportant object. Another example can include assigning higher S_(N) forthe areas containing semantically important objects, such as human face.

Further referring to FIG. 5 , identifying first region may includedetermining a measure of spatial activity of each block of a pluralityof blocks and identifying the first region using the measure of spatialactivity. As used in this disclosure, a “spatial activity measure” is aquantity indicating how frequently and with what amplitude texturechanges within a block, set of blocks, and/or area of a frame. In otherwords, flat areas, such as sky, may have a low spatial activity measure,while complex areas such as grass will receive a high spatial activitymeasure. Determination of a respective spatial activity measure mayinclude determination using a transform matrix, such without limitationa discrete cosine transformation matrix. Determining respective spatialactivity measure for each block may include determination using ageneralized discrete cosine transformation matrix, which may includewithout limitation any discrete cosine transformation matrix asdescribed above. For instance, determining the respective spatialactivity measure for each block may include using a generalized discretecosine transformation matrix, a generalized discrete cosine transform IImatrix, and/or an integer approximation of a discrete cosine transformmatrix.

Still referring to FIG. 5 , multiple blocks and/or other areasidentified for lossless encoding according to any method described inthis disclosure may be combined and/or fused together as first region;for instance, and without limitation, a plurality of contiguous blocksso identified may be combined and/or fused together. Block fusion mayinclude determining a first area within the video frame including afirst grouping of a first subset of the blocks. In block fusion, eachblock may be assigned to an area. Assignment logic, such as withoutlimitation semantic information, may be obtained from an outside source,which semantic information may be received at 130; as a non-limitingexample, semantic information may include information provided from aface detector such that the semantic information includes datacharacterizing a facial detection. Accordingly, first grouping may bedetermined based on the received semantic information. In someimplementations, assignment logic may be predefined, for example,according to a number of clustering or grouping algorithms. Encoder maybe further configured to determine a second area within video frameincluding a second grouping of a second subset of the blocks.

Continuing to refer to FIG. 5 , any block that has at least one pixelbelonging to an object of interest, such as without limitation a face,as identified for example via received semantic information, may beassigned to a shaded area (A2), for instance according to the receivedsemantic information, and fused with other blocks in that area.

In some implementations, and still referring to FIG. 5 , block fusionmay be performed using the spatial activity measures. In block fusion,each block may be assigned to an area. For example, a first area withinthe video frame including a first grouping of a subset of the blocks maybe determined. The first grouping may be based on the respective spatialactivity measure. Blocks may be grouped into areas of similar frequencycontent thereby representing areas with similar spatial activity. Forexample, determining the first area may include iterating over each ofthe plurality of blocks and, for each current block, comparing thespatial activity measure of the current block to a spatial activitymeasure of a preceding block and determining whether a difference isbelow a predefined threshold, and assigning the current block to thefirst area. The current block may be assigned to a second area inresponse to or based on determining that the difference is above thepredefined threshold. Persons skilled in the art, upon reviewing theentirety of this disclosure, will be aware of various ways in whichthreshold comparison may be performed, including that assignment to afirst block may alternatively or additionally be accomplished bydetermination that a degree of similarity exceeds a threshold and/orthat assignment to a different group may be accomplished by determiningthat a degree of difference exceeds a threshold. A threshold may bestored in memory and/or generated using previously or concurrentlyreceived and/or calculated values, which may include any numericalvalues and/or measurements described in this disclosure. Losslessencoding protocol for first frame may include any encoding protocoldescribed above, including without limitation BDPCM.

At step 520, and continuing to refer to FIG. 5 , encoder encodes thecurrent frame, wherein encoding the current frame further comprisesencoding the first region using the lossless encoding protocol. Encodingcurrent frame further may include inserting an indication that at leasta first region is encoded according to a lossless encoding protocol in asub-picture header, associating the sub-picture header with the at leasta first region, and including the sub-picture header in bitstream; thismay be implemented without limitation as described above in reference toFIGS. 1-4 . Including sub-picture header in bitstream further comprisesexplicitly including the sub-picture header in data corresponding tocurrent frame. Alternatively or additionally, including sub-pictureheader in bitstream may include the sub-picture header in the bitstreamfurther comprises including a reference to an identifier of asub-picture header corresponding to a third sub-picture. Encoding mayinclude indicating in a bitstream field a type of lossless encodingprotocol.

In an embodiment, and still referring to FIG. 5 , encoder may identify asecond region to be encoded according to a lossless encoding protocoland encode the second region according to the lossless encodingprotocol. Identification may be performed using any process and/orprocess step for identification of first region. Lossless encodingprotocol may include, without limitation, any encoding protocoldescribed above, including without limitation transform skip residualcoding.

In an embodiment, and still referring to FIG. 5 , encoder may identify athird region to be encoded according to a lossy encoding protocol andencode the third region according to the lossy encoding protocol. Thismay be performed, without limitation, using any form of determinationand/or threshold comparison described above, where failure to meet orexceed a threshold indicative of inclusion in first area may indicateinclusion in second area and/or that a lossy encoding protocol is to beemployed. Identification may include, for instance, comparison ofaverage measure of information to a threshold, comparison of a measureof spatial activity to a threshold, comparison of a significance scoreto a threshold, or the like. Identifying third region may includereceiving a user identification of third region, which may be performed,without limitation as described above for receiving a useridentification of first region.

With continued reference to FIG. 5 , encoder may insert an indicationthat third region is encoded according to a lossless encoding protocolin a sub-picture header, associate the sub-picture header with the thirdregion, and including the sub-picture header in bitstream; this may beperformed as described in further detail above. For instance, andwithout limitation, encoder may include sub-picture header explicitly indata corresponding to the current frame. Alternatively or additionally,encoder may include sub-picture header by reference to an identifier ofa sub-picture header corresponding to a third sub-picture.

Still referring to FIG. 5 , encoder may use multi-threading and/orparallel processing of sub-pictures, as described above, to improveefficiency of encoding process. For instance, encoder may encode thefirst region using a first processor thread and encode the third regionelement using a second processor thread.

FIG. 6 is a system block diagram illustrating an exemplary embodiment ofa video encoder 600 capable of constructing a motion vector candidatelist including adding a single global motion vector candidate to themotion vector candidate list. Example video encoder 600 may receive aninput video 604, which may be initially segmented and/or dividingaccording to a processing scheme, such as a tree-structured macro blockpartitioning scheme (e.g., quad-tree plus binary tree). An example of atree-structured macro block partitioning scheme may include partitioninga picture frame into large block elements called coding tree units(CTU). In some implementations, each CTU may be further partitioned oneor more times into a number of sub-blocks called coding units (CU). Afinal result of this portioning may include a group of sub-blocks thatmay be called predictive units (PU). Transform units (TU) may also beutilized.

Still referring to FIG. 6 , example video encoder 600 may include anintra prediction processor 608, a motion estimation/compensationprocessor 612 (also referred to as an inter prediction processor)capable of constructing a motion vector candidate list including addinga single global motion vector candidate to the motion vector candidatelist, a transform/quantization processor 616, an inversequantization/inverse transform processor 620, an in-loop filter 624, adecoded picture buffer 628, and/or an entropy coding processor 632. Bitstream parameters may be input to entropy coding processor 632 forinclusion in an output bit stream 636.

In operation, and with continued reference to FIG. 6 , for each block ofa frame of input video 604, whether to process block via intra pictureprediction or using motion estimation/compensation may be determined.Block may be provided to intra prediction processor 608 or motionestimation/compensation processor 612. If block is to be processed viaintra prediction, intra prediction processor 608 may perform processingto output a predictor. If block is to be processed via motionestimation/compensation, motion estimation/compensation processor 612may perform processing including constructing a motion vector candidatelist including adding a single global motion vector candidate to themotion vector candidate list, if applicable.

Still referring to FIG. 6 , a residual may be formed by subtractingpredictor from input video. Residual may be received bytransform/quantization processor 616, which may perform transformationprocessing (e.g., discrete cosine transform (DCT)) to producecoefficients, which may be quantized. Quantized coefficients and anyassociated signaling information may be provided to entropy codingprocessor 632 for entropy encoding and inclusion in an output bit stream636. Entropy encoding processor 632 may support encoding of signalinginformation related to encoding a current block. In addition, quantizedcoefficients may be provided to inverse quantization/inversetransformation processor 620, which may reproduce pixels, which may becombined with predictor and processed by in loop filter 624, an outputof which may be stored in decoded picture buffer 628 for use by motionestimation/compensation processor 612 that is capable of constructing amotion vector candidate list including adding a single global motionvector candidate to the motion vector candidate list.

Further referencing FIG. 6 , although a few variations have beendescribed in detail above, other modifications or additions arepossible. For example, in some implementations, current blocks mayinclude any symmetric blocks (8×8, 16×16, 32×32, 64×64, 128×128, and thelike) as well as any asymmetric block (8×4, 16×8, and the like).

In some implementations, and still referring to FIG. 6 , a quadtree plusbinary decision tree (QTBT) may be implemented. In QTBT, at a CodingTree Unit level, partition parameters of QTBT may be dynamically derivedto adapt to local characteristics without transmitting any overhead.Subsequently, at a Coding Unit level, a joint-classifier decision treestructure may eliminate unnecessary iterations and control risk of falseprediction. In some implementations, LTR frame block update mode may beavailable as an additional option available at every leaf node of aQTBT.

In some implementations, and still referring to FIG. 6 , additionalsyntax elements may be signaled at different hierarchy levels of abitstream. For example, a flag may be enabled for an entire sequence byincluding an enable flag coded in a Sequence Parameter Set (SPS).Further, a CTU flag may be coded at a coding tree unit (CTU) level.

With continued reference to FIG. 6 , non-transitory computer programproducts (i.e., physically embodied computer program products) may storeinstructions, which when executed by one or more data processors of oneor more computing systems, causes at least one data processor to performoperations, and/or steps thereof described in this disclosure, includingwithout limitation any operations described above 400 and/or encoder 600may be configured to perform. Similarly, computer systems are alsodescribed that may include one or more data processors and memorycoupled to the one or more data processors. The memory may temporarilyor permanently store instructions that cause at least one processor toperform one or more of the operations described herein. In addition,methods can be implemented by one or more data processors either withina single computing system or distributed among two or more computingsystems. Such computing systems can be connected and can exchange dataand/or commands or other instructions or the like via one or moreconnections, including a connection over a network (e.g. the Internet, awireless wide area network, a local area network, a wide area network, awired network, or the like), via a direct connection between one or moreof the multiple computing systems, or the like.

With continued reference to FIG. 5 , encoder 500, decoder 400, and/orcircuitry thereof may be designed and/or configured to perform anymethod, method step, or sequence of method steps in any embodimentdescribed in this disclosure, in any order and with any degree ofrepetition. For instance, encoder 500, decoder 400, and/or circuitrythereof may be configured to perform a single step or sequencerepeatedly until a desired or commanded outcome is achieved; repetitionof a step or a sequence of steps may be performed iteratively and/orrecursively using outputs of previous repetitions as inputs tosubsequent repetitions, aggregating inputs and/or outputs of repetitionsto produce an aggregate result, reduction or decrement of one or morevariables such as global variables, and/or division of a largerprocessing task into a set of iteratively addressed smaller processingtasks. Encoder 500, decoder 400, and/or circuitry thereof may performany step or sequence of steps as described in this disclosure inparallel, such as simultaneously and/or substantially simultaneouslyperforming a step two or more times using two or more parallel threads,processor cores, or the like; division of tasks between parallel threadsand/or processes may be performed according to any protocol suitable fordivision of tasks between iterations. Persons skilled in the art, uponreviewing the entirety of this disclosure, will be aware of various waysin which steps, sequences of steps, processing tasks, and/or data may besubdivided, shared, or otherwise dealt with using iteration, recursion,and/or parallel processing.

It is to be noted that any one or more of the aspects and embodimentsdescribed herein may be conveniently implemented using one or moremachines (e.g., one or more computing devices that are utilized as auser computing device for an electronic document, one or more serverdevices, such as a document server, etc.) programmed according to theteachings of the present specification, as will be apparent to those ofordinary skill in the computer art. Appropriate software coding canreadily be prepared by skilled programmers based on the teachings of thepresent disclosure, as will be apparent to those of ordinary skill inthe software art. Aspects and implementations discussed above employingsoftware and/or software modules may also include appropriate hardwarefor assisting in the implementation of the machine executableinstructions of the software and/or software module.

Such software may be a computer program product that employs amachine-readable storage medium. A machine-readable storage medium maybe any medium that is capable of storing and/or encoding a sequence ofinstructions for execution by a machine (e.g., a computing device) andthat causes the machine to perform any one of the methodologies and/orembodiments described herein. Examples of a machine-readable storagemedium include, but are not limited to, a magnetic disk, an optical disc(e.g., CD, CD-R, DVD, DVD-R, etc.), a magneto-optical disk, a read-onlymemory “ROM” device, a random-access memory “RAM” device, a magneticcard, an optical card, a solid-state memory device, an EPROM, an EEPROM,and any combinations thereof. A machine-readable medium, as used herein,is intended to include a single medium as well as a collection ofphysically separate media, such as, for example, a collection of compactdiscs or one or more hard disk drives in combination with a computermemory. As used herein, a machine-readable storage medium does notinclude transitory forms of signal transmission.

Such software may also include information (e.g., data) carried as adata signal on a data carrier, such as a carrier wave. For example,machine-executable information may be included as a data-carrying signalembodied in a data carrier in which the signal encodes a sequence ofinstruction, or portion thereof, for execution by a machine (e.g., acomputing device) and any related information (e.g., data structures anddata) that causes the machine to perform any one of the methodologiesand/or embodiments described herein.

Examples of a computing device include, but are not limited to, anelectronic book reading device, a computer workstation, a terminalcomputer, a server computer, a handheld device (e.g., a tablet computer,a smartphone, etc.), a web appliance, a network router, a networkswitch, a network bridge, any machine capable of executing a sequence ofinstructions that specify an action to be taken by that machine, and anycombinations thereof. In one example, a computing device may includeand/or be included in a kiosk.

FIG. 7 shows a diagrammatic representation of one embodiment of acomputing device in the exemplary form of a computer system 700 withinwhich a set of instructions for causing a control system to perform anyone or more of the aspects and/or methodologies of the presentdisclosure may be executed. It is also contemplated that multiplecomputing devices may be utilized to implement a specially configuredset of instructions for causing one or more of the devices to performany one or more of the aspects and/or methodologies of the presentdisclosure. Computer system 700 includes a processor 704 and a memory708 that communicate with each other, and with other components, via abus 712. Bus 712 may include any of several types of bus structuresincluding, but not limited to, a memory bus, a memory controller, aperipheral bus, a local bus, and any combinations thereof, using any ofa variety of bus architectures.

Processor 704 may include any suitable processor, such as withoutlimitation a processor incorporating logical circuitry for performingarithmetic and logical operations, such as an arithmetic and logic unit(ALU), which may be regulated with a state machine and directed byoperational inputs from memory and/or sensors; processor 704 may beorganized according to Von Neumann and/or Harvard architecture as anon-limiting example. Processor 704 may include, incorporate, and/or beincorporated in, without limitation, a microcontroller, microprocessor,digital signal processor (DSP), Field Programmable Gate Array (FPGA),Complex Programmable Logic Device (CPLD), Graphical Processing Unit(GPU), general purpose GPU, Tensor Processing Unit (TPU), analog ormixed signal processor, Trusted Platform Module (TPM), a floating-pointunit (FPU), and/or system on a chip (SoC).

Memory 708 may include various components (e.g., machine-readable media)including, but not limited to, a random-access memory component, a readonly component, and any combinations thereof. In one example, a basicinput/output system 716 (BIOS), including basic routines that help totransfer information between elements within computer system 700, suchas during start-up, may be stored in memory 708. Memory 708 may alsoinclude (e.g., stored on one or more machine-readable media)instructions (e.g., software) 720 embodying any one or more of theaspects and/or methodologies of the present disclosure. In anotherexample, memory 708 may further include any number of program modulesincluding, but not limited to, an operating system, one or moreapplication programs, other program modules, program data, and anycombinations thereof.

Computer system 700 may also include a storage device 724. Examples of astorage device (e.g., storage device 724) include, but are not limitedto, a hard disk drive, a magnetic disk drive, an optical disc drive incombination with an optical medium, a solid-state memory device, and anycombinations thereof. Storage device 724 may be connected to bus 712 byan appropriate interface (not shown). Example interfaces include, butare not limited to, SCSI, advanced technology attachment (ATA), serialATA, universal serial bus (USB), IEEE 1394 (FIREWIRE), and anycombinations thereof. In one example, storage device 724 (or one or morecomponents thereof) may be removably interfaced with computer system 700(e.g., via an external port connector (not shown)). Particularly,storage device 724 and an associated machine-readable medium 728 mayprovide nonvolatile and/or volatile storage of machine-readableinstructions, data structures, program modules, and/or other data forcomputer system 700. In one example, software 720 may reside, completelyor partially, within machine-readable medium 728. In another example,software 720 may reside, completely or partially, within processor 704.

Computer system 700 may also include an input device 732. In oneexample, a user of computer system 700 may enter commands and/or otherinformation into computer system 700 via input device 732. Examples ofan input device 732 include, but are not limited to, an alpha-numericinput device (e.g., a keyboard), a pointing device, a joystick, agamepad, an audio input device (e.g., a microphone, a voice responsesystem, etc.), a cursor control device (e.g., a mouse), a touchpad, anoptical scanner, a video capture device (e.g., a still camera, a videocamera), a touchscreen, and any combinations thereof. Input device 732may be interfaced to bus 712 via any of a variety of interfaces (notshown) including, but not limited to, a serial interface, a parallelinterface, a game port, a USB interface, a FIREWIRE interface, a directinterface to bus 712, and any combinations thereof. Input device 732 mayinclude a touch screen interface that may be a part of or separate fromdisplay 736, discussed further below. Input device 732 may be utilizedas a user selection device for selecting one or more graphicalrepresentations in a graphical interface as described above.

A user may also input commands and/or other information to computersystem 700 via storage device 724 (e.g., a removable disk drive, a flashdrive, etc.) and/or network interface device 740. A network interfacedevice, such as network interface device 740, may be utilized forconnecting computer system 700 to one or more of a variety of networks,such as network 744, and one or more remote devices 748 connectedthereto. Examples of a network interface device include, but are notlimited to, a network interface card (e.g., a mobile network interfacecard, a LAN card), a modem, and any combination thereof. Examples of anetwork include, but are not limited to, a wide area network (e.g., theInternet, an enterprise network), a local area network (e.g., a networkassociated with an office, a building, a campus or other relativelysmall geographic space), a telephone network, a data network associatedwith a telephone/voice provider (e.g., a mobile communications providerdata and/or voice network), a direct connection between two computingdevices, and any combinations thereof. A network, such as network 744,may employ a wired and/or a wireless mode of communication. In general,any network topology may be used. Information (e.g., data, software 720,etc.) may be communicated to and/or from computer system 700 via networkinterface device 740.

Computer system 700 may further include a video display adapter 752 forcommunicating a displayable image to a display device, such as displaydevice 736. Examples of a display device include, but are not limitedto, a liquid crystal display (LCD), a cathode ray tube (CRT), a plasmadisplay, a light emitting diode (LED) display, and any combinationsthereof. Display adapter 752 and display device 736 may be utilized incombination with processor 704 to provide graphical representations ofaspects of the present disclosure. In addition to a display device,computer system 700 may include one or more other peripheral outputdevices including, but not limited to, an audio speaker, a printer, andany combinations thereof. Such peripheral output devices may beconnected to bus 712 via a peripheral interface 756. Examples of aperipheral interface include, but are not limited to, a serial port, aUSB connection, a FIREWIRE connection, a parallel connection, and anycombinations thereof.

The foregoing has been a detailed description of illustrativeembodiments of the invention. Various modifications and additions can bemade without departing from the spirit and scope of this invention.Features of each of the various embodiments described above may becombined with features of other described embodiments as appropriate inorder to provide a multiplicity of feature combinations in associatednew embodiments. Furthermore, while the foregoing describes a number ofseparate embodiments, what has been described herein is merelyillustrative of the application of the principles of the presentinvention. Additionally, although particular methods herein may beillustrated and/or described as being performed in a specific order, theordering is highly variable within ordinary skill to achieve methods,systems, and software according to the present disclosure. Accordingly,this description is meant to be taken only by way of example, and not tootherwise limit the scope of this invention.

Exemplary embodiments have been disclosed above and illustrated in theaccompanying drawings. It will be understood by those skilled in the artthat various changes, omissions and additions may be made to that whichis specifically disclosed herein without departing from the spirit andscope of the present invention.

What is claimed is:
 1. An encoder, the encoder comprising circuitryconfigured to: receive an input video; for a current picture: identify afirst sub-picture of the current picture to be encoded using a losslessencoding protocol; identify a second sub-picture of the current pictureto be encoded with a lossy coding protocol; encode the current picture,wherein encoding the current picture further comprises: encoding thefirst sub-picture using the lossless encoding protocol and the secondsub-picture using the lossy encoding protocol; inserting an indicationthat the first sub-picture is encoded according to a lossless encodingprotocol in a first sub-picture header; inserting an indication that thesecond sub-picture is encoded according to a lossy encoding protocol ina second sub-picture header; associating the first sub-picture headerwith the first sub-picture and the second sub-picture header with thesecond subpicture; and including the first and second sub-pictureheaders in the bitstream.
 2. A method of combined lossless and lossycoding, the method comprising: receiving, by an encoder, an input video;for a current picture; identifying, by the encoder, a first subpictureof the current picture to be encoded using a lossless encoding protocol;identify a second sub-picture of the current picture to be encoded witha lossy coding protocol; encoding, by the encoder, the current picture,wherein encoding the current picture further comprises: encoding thefirst subpicture using the lossless encoding protocol and the secondsub-picture using the lossy encoding protocol; inserting an indicationthat the first sub-picture is encoded according to a lossless encodingprotocol in a first sub-picture header; inserting an indication that thesecond sub-picture is encoded according to a lossy encoding protocol ina second sub-picture header; associating the first sub-picture headerwith the first sub-picture and the second sub-picture header with thesecond subpicture; and including the first and second sub-pictureheaders in the bitstream.
 3. An encoder for encoding a bitstream, thebitstream adapted to be decoded by a decoder being configured to:receive the bitstream, the bitstream including a coded picture, thecoded picture including a first coded sub-picture and a second codedsub-picture, the bitstream also including a first sub-picture header anda second sub-picture header; detect in the first sub-picture header thatthe first sub-picture is coded using a lossless encoding protocol;detect in the second sub-picture header that the second sub-picture iscoded using a lossy encoding protocol, decode the first sub-pictureusing a protocol for lossless decoding corresponding to the detectedlossless encoding protocol; and decode the second sub-picture using aprotocol corresponding to the detected lossy encoding protocol.
 4. Theencoder of claim 3 wherein the first sub-picture is an independentlycoded sub-picture.
 5. The encoder of claim 3 wherein the secondsub-picture is an independently coded sub-picture.
 6. The encoder ofclaim 3 wherein the picture includes a region coded using transform skipresidual coding.
 7. The encoder of claim 6 wherein the region codedusing transform skip residual coding is the first sub-picture.